package cn.yaminets.ojknowledgegraph.service.core;

import cn.yaminets.ojknowledgegraph.pojo.node.Tags;
import cn.yaminets.ojknowledgegraph.repository.LuoguTagsRepository;
import cn.yaminets.ojknowledgegraph.utils.BeanUtil;
import cn.yaminets.ojknowledgegraph.utils.YmUtils;
import com.alibaba.fastjson.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


@Service
public class TagsHandler implements NodeHandler {

    @Resource
    LuoguTagsRepository tagsRepository;

    Logger logger = LoggerFactory.getLogger("TagsHandler");


    @Override
    public void handler(NodeChain chain) {
        logger.info("nodeHandler: 构建[标签]节点 开始");
        String tagJson = "[{\"name\":\"模拟\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":1},{\"name\":\"字符串\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":2},{\"name\":\"动态规划,动规,dp\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":3},{\"name\":\"搜索\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":4},{\"name\":\"数论,数学\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":5},{\"name\":\"图论\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":6},{\"name\":\"贪心\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":7},{\"name\":\"计算几何\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":8},{\"name\":\"暴力数据结构\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":9},{\"name\":\"高精\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":10},{\"name\":\"树形结构\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":11},{\"name\":\"递推\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":12},{\"name\":\"博弈论\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":13},{\"name\":\"1997\",\"type\":\"Time\",\"color\":\"blue\",\"tagInt\":14},{\"name\":\"1998\",\"type\":\"Time\",\"color\":\"blue\",\"tagInt\":15},{\"name\":\"1999\",\"type\":\"Time\",\"color\":\"blue\",\"tagInt\":16},{\"name\":\"2000\",\"type\":\"Time\",\"color\":\"blue\",\"tagInt\":17},{\"name\":\"2001(或之前)\",\"type\":\"Time\",\"color\":\"blue\",\"tagInt\":18},{\"name\":\"2002\",\"type\":\"Time\",\"color\":\"blue\",\"tagInt\":19},{\"name\":\"2003\",\"type\":\"Time\",\"color\":\"blue\",\"tagInt\":20},{\"name\":\"2004\",\"type\":\"Time\",\"color\":\"blue\",\"tagInt\":21},{\"name\":\"2005\",\"type\":\"Time\",\"color\":\"blue\",\"tagInt\":22},{\"name\":\"2006\",\"type\":\"Time\",\"color\":\"blue\",\"tagInt\":23},{\"name\":\"2007\",\"type\":\"Time\",\"color\":\"blue\",\"tagInt\":24},{\"name\":\"2008\",\"type\":\"Time\",\"color\":\"blue\",\"tagInt\":25},{\"name\":\"2009\",\"type\":\"Time\",\"color\":\"blue\",\"tagInt\":26},{\"name\":\"2010\",\"type\":\"Time\",\"color\":\"blue\",\"tagInt\":27},{\"name\":\"2011\",\"type\":\"Time\",\"color\":\"blue\",\"tagInt\":28},{\"name\":\"2012\",\"type\":\"Time\",\"color\":\"blue\",\"tagInt\":29},{\"name\":\"2013\",\"type\":\"Time\",\"color\":\"blue\",\"tagInt\":30},{\"name\":\"2014\",\"type\":\"Time\",\"color\":\"blue\",\"tagInt\":31},{\"name\":\"2015\",\"type\":\"Time\",\"color\":\"blue\",\"tagInt\":32},{\"name\":\"2016\",\"type\":\"Time\",\"color\":\"blue\",\"tagInt\":33},{\"name\":\"2017\",\"type\":\"Time\",\"color\":\"blue\",\"tagInt\":34},{\"name\":\"2018\",\"type\":\"Time\",\"color\":\"blue\",\"tagInt\":35},{\"name\":\"2019\",\"type\":\"Time\",\"color\":\"blue\",\"tagInt\":36},{\"name\":\"2020\",\"type\":\"Time\",\"color\":\"blue\",\"tagInt\":37},{\"name\":\"重庆\",\"type\":\"Region\",\"color\":\"green\",\"tagInt\":38},{\"name\":\"四川\",\"type\":\"Region\",\"color\":\"green\",\"tagInt\":39},{\"name\":\"河南\",\"type\":\"Region\",\"color\":\"green\",\"tagInt\":40},{\"name\":\"莫队\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":41},{\"name\":\"线段树\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":42},{\"name\":\"倍增\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":43},{\"name\":\"线性结构\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":44},{\"name\":\"二分答案\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":45},{\"name\":\"USACO\",\"type\":\"Origin\",\"color\":\"blue\",\"tagInt\":46},{\"name\":\"并查集\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":47},{\"name\":\"各省省选\",\"type\":\"Origin\",\"color\":\"blue\",\"tagInt\":48},{\"name\":\"点分治\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":49},{\"name\":\"平衡树\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":50},{\"name\":\"二叉堆\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":51},{\"name\":\"WC/CTSC/集训队\",\"type\":\"Origin\",\"color\":\"blue\",\"tagInt\":52},{\"name\":\"树状数组\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":53},{\"name\":\"递归\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":54},{\"name\":\"最大匹配\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":55},{\"name\":\"单调队列\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":56},{\"name\":\"POI\",\"type\":\"Origin\",\"color\":\"blue\",\"tagInt\":57},{\"name\":\"2021\",\"type\":\"Time\",\"color\":\"blue\",\"tagInt\":58},{\"name\":\"2022\",\"type\":\"Time\",\"color\":\"blue\",\"tagInt\":59},{\"name\":\"2023\",\"type\":\"Time\",\"color\":\"blue\",\"tagInt\":60},{\"name\":\"2024\",\"type\":\"Time\",\"color\":\"blue\",\"tagInt\":61},{\"name\":\"2025\",\"type\":\"Time\",\"color\":\"blue\",\"tagInt\":62},{\"name\":\"NOI2007\",\"type\":\"Unknown\",\"color\":\"black\",\"tagInt\":63},{\"name\":\"NOI2008\",\"type\":\"Unknown\",\"color\":\"black\",\"tagInt\":64},{\"name\":\"NOI2009\",\"type\":\"Unknown\",\"color\":\"black\",\"tagInt\":65},{\"name\":\"NOI2010\",\"type\":\"Unknown\",\"color\":\"black\",\"tagInt\":66},{\"name\":\"NOI2011\",\"type\":\"Unknown\",\"color\":\"black\",\"tagInt\":67},{\"name\":\"NOI2012\",\"type\":\"Unknown\",\"color\":\"black\",\"tagInt\":68},{\"name\":\"NOI2013\",\"type\":\"Unknown\",\"color\":\"black\",\"tagInt\":69},{\"name\":\"福建省历届夏令营\",\"type\":\"Origin\",\"color\":\"blue\",\"tagInt\":70},{\"name\":\"矩阵运算\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":71},{\"name\":\"整数研究\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":72},{\"name\":\"算法\",\"type\":\"Unknown\",\"color\":\"black\",\"tagInt\":73},{\"name\":\"数据结构\",\"type\":\"Unknown\",\"color\":\"black\",\"tagInt\":74},{\"name\":\"来源\",\"type\":\"Unknown\",\"color\":\"black\",\"tagInt\":75},{\"name\":\"时间\",\"type\":\"Unknown\",\"color\":\"black\",\"tagInt\":76},{\"name\":\"NOI系列\",\"type\":\"Origin\",\"color\":\"blue\",\"tagInt\":77},{\"name\":\"离散化\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":78},{\"name\":\"网络流\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":79},{\"name\":\"高级数据结构\",\"type\":\"Unknown\",\"color\":\"black\",\"tagInt\":80},{\"name\":\"洛谷原创\",\"type\":\"Origin\",\"color\":\"blue\",\"tagInt\":81},{\"name\":\"NOIp普及组\",\"type\":\"Origin\",\"color\":\"blue\",\"tagInt\":82},{\"name\":\"NOIp提高组\",\"type\":\"Origin\",\"color\":\"blue\",\"tagInt\":83},{\"name\":\"NOIp初赛\",\"type\":\"Origin\",\"color\":\"blue\",\"tagInt\":84},{\"name\":\"APIO\",\"type\":\"Origin\",\"color\":\"blue\",\"tagInt\":85},{\"name\":\"垃圾\",\"type\":\"Unknown\",\"color\":\"black\",\"tagInt\":86},{\"name\":\"地区\",\"type\":\"Unknown\",\"color\":\"black\",\"tagInt\":87},{\"name\":\"浙江\",\"type\":\"Region\",\"color\":\"green\",\"tagInt\":88},{\"name\":\"上海\",\"type\":\"Region\",\"color\":\"green\",\"tagInt\":89},{\"name\":\"福建\",\"type\":\"Region\",\"color\":\"green\",\"tagInt\":90},{\"name\":\"江苏\",\"type\":\"Region\",\"color\":\"green\",\"tagInt\":91},{\"name\":\"安徽\",\"type\":\"Region\",\"color\":\"green\",\"tagInt\":92},{\"name\":\"湖南\",\"type\":\"Region\",\"color\":\"green\",\"tagInt\":93},{\"name\":\"北京\",\"type\":\"Region\",\"color\":\"green\",\"tagInt\":94},{\"name\":\"河北\",\"type\":\"Region\",\"color\":\"green\",\"tagInt\":95},{\"name\":\"广东\",\"type\":\"Region\",\"color\":\"green\",\"tagInt\":96},{\"name\":\"山东\",\"type\":\"Region\",\"color\":\"green\",\"tagInt\":97},{\"name\":\"吉林\",\"type\":\"Region\",\"color\":\"green\",\"tagInt\":98},{\"name\":\"NOI导刊\",\"type\":\"Origin\",\"color\":\"blue\",\"tagInt\":99},{\"name\":\"cdq分治\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":100},{\"name\":\"后缀自动机,SAM\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":101},{\"name\":\"IOI\",\"type\":\"Origin\",\"color\":\"blue\",\"tagInt\":102},{\"name\":\"交互题\",\"type\":\"SpecialProblem\",\"color\":\"orange\",\"tagInt\":103},{\"name\":\"提交答案\",\"type\":\"SpecialProblem\",\"color\":\"orange\",\"tagInt\":104},{\"name\":\"特殊题目\",\"type\":\"Unknown\",\"color\":\"black\",\"tagInt\":105},{\"name\":\"初赛\",\"type\":\"SpecialProblem\",\"color\":\"orange\",\"tagInt\":106},{\"name\":\"Special Judge\",\"type\":\"SpecialProblem\",\"color\":\"orange\",\"tagInt\":107},{\"name\":\"O2优化\",\"type\":\"SpecialProblem\",\"color\":\"orange\",\"tagInt\":108},{\"name\":\"新云端\",\"type\":\"SpecialProblem\",\"color\":\"orange\",\"tagInt\":109},{\"name\":\"\uFEFF基础算法\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":110},{\"name\":\"枚举,暴力\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":111},{\"name\":\"分治\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":112},{\"name\":\"排序\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":113},{\"name\":\"冒泡排序\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":114},{\"name\":\"选择排序\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":115},{\"name\":\"桶排\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":116},{\"name\":\"插入排序\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":117},{\"name\":\"归并排序\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":118},{\"name\":\"快速排序,快排\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":119},{\"name\":\"堆排序\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":120},{\"name\":\"希尔排序\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":121},{\"name\":\"外部排序\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":122},{\"name\":\"查找算法\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":123},{\"name\":\"顺序查找\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":124},{\"name\":\"二分查找\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":125},{\"name\":\"广度优先搜索,BFS\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":126},{\"name\":\"深度优先搜索,DFS\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":127},{\"name\":\"剪枝\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":128},{\"name\":\"记忆化搜索\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":129},{\"name\":\"启发式搜索\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":130},{\"name\":\"迭代加深\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":131},{\"name\":\"启发式迭代加深,IDA*\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":132},{\"name\":\"Dancing Links\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":133},{\"name\":\"爬山法\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":134},{\"name\":\"模拟退火\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":135},{\"name\":\"随机调整\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":136},{\"name\":\"遗传\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":137},{\"name\":\"动态规划初步\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":138},{\"name\":\"背包\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":139},{\"name\":\"环型动规,环型dp\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":140},{\"name\":\"数位动规,数位dp\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":141},{\"name\":\"序列型动规,序列型dp\",\"type\":\"Unknown\",\"color\":\"black\",\"tagInt\":142},{\"name\":\"多维状态\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":143},{\"name\":\"区间动规,区间dp\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":144},{\"name\":\"子母树\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":145},{\"name\":\"动态规划优化\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":146},{\"name\":\"降低维度,降维\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":147},{\"name\":\"优先队列\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":148},{\"name\":\"矩阵加速,矩阵优化\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":149},{\"name\":\"斜率优化\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":150},{\"name\":\"状态压缩,状压\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":151},{\"name\":\"树形动规\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":152},{\"name\":\"凸完全单调性,凸单调\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":153},{\"name\":\"四边形不等式\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":154},{\"name\":\"图的建立,建图\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":155},{\"name\":\"邻接矩阵\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":156},{\"name\":\"邻接表\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":157},{\"name\":\"图遍历\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":158},{\"name\":\"拓扑排序\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":159},{\"name\":\"最短路\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":160},{\"name\":\"Floyd\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":161},{\"name\":\"Dijkstra\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":162},{\"name\":\"Bellman-Ford\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":163},{\"name\":\"SPFA\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":164},{\"name\":\"K短路\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":165},{\"name\":\"生成树\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":166},{\"name\":\"Prim\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":167},{\"name\":\"Kruskal\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":168},{\"name\":\"生成树的另类算法\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":169},{\"name\":\"次小生成树\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":170},{\"name\":\"特殊生成树\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":171},{\"name\":\"圈和块\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":172},{\"name\":\"最小环\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":173},{\"name\":\"负权环\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":174},{\"name\":\"连通块\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":175},{\"name\":\"2-SAT\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":176},{\"name\":\"欧拉公式\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":177},{\"name\":\"四色定理\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":178},{\"name\":\"强连通分量,缩点\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":179},{\"name\":\"Tarjan\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":180},{\"name\":\"割点\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":181},{\"name\":\"欧拉回路\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":182},{\"name\":\"AOV\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":183},{\"name\":\"AOE\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":184},{\"name\":\"差分约束\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":185},{\"name\":\"仙人掌\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":186},{\"name\":\"二分图\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":187},{\"name\":\"匈牙利算法\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":188},{\"name\":\"一般图的最大匹配\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":189},{\"name\":\"Konig定理\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":190},{\"name\":\"带权二分图匹配\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":191},{\"name\":\"KM算法\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":192},{\"name\":\"稳定婚姻系统\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":193},{\"name\":\"最大流\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":194},{\"name\":\"Dinic\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":195},{\"name\":\"Sap\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":196},{\"name\":\"有上下界的最大流\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":197},{\"name\":\"最小割\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":198},{\"name\":\"闭合图\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":199},{\"name\":\"最小点权覆盖集\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":200},{\"name\":\"最大点权独立集\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":201},{\"name\":\"分数规划\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":202},{\"name\":\"最大密度子图\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":203},{\"name\":\"费用流\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":204},{\"name\":\"最短路增广费用流\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":205},{\"name\":\"zkw费用流\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":206},{\"name\":\"最小费用可行流\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":207},{\"name\":\"树的遍历\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":208},{\"name\":\"树上距离\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":209},{\"name\":\"节点到根的距离\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":210},{\"name\":\"最近公共祖先,LCA\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":211},{\"name\":\"节点间的距离\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":212},{\"name\":\"树的直径\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":213},{\"name\":\"哈夫曼树\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":214},{\"name\":\"左偏树\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":215},{\"name\":\"斜堆\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":216},{\"name\":\"二项堆\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":217},{\"name\":\"AVL\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":218},{\"name\":\"Treap\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":219},{\"name\":\"SBT\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":220},{\"name\":\"Splay\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":221},{\"name\":\"静态排序树\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":222},{\"name\":\"替罪羊树\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":223},{\"name\":\"二维线段树\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":224},{\"name\":\"矩形树\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":225},{\"name\":\"zkw线段树\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":226},{\"name\":\"动态树\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":227},{\"name\":\"树链剖分,树剖\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":228},{\"name\":\"Link-Cut Tree,LCT\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":229},{\"name\":\"树的应用\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":230},{\"name\":\"RMQ\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":231},{\"name\":\"树套树\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":232},{\"name\":\"主席树\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":233},{\"name\":\"可持久化\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":234},{\"name\":\"哈希,HASH\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":235},{\"name\":\"ELFhash\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":236},{\"name\":\"SDBM\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":237},{\"name\":\"BKDR\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":238},{\"name\":\"素数判断,质数,筛法\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":239},{\"name\":\"众数\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":240},{\"name\":\"最大公约数,gcd\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":241},{\"name\":\"扩展欧几里德,扩欧\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":242},{\"name\":\"不定方程\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":243},{\"name\":\"进制\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":244},{\"name\":\"集合论\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":245},{\"name\":\"群论\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":246},{\"name\":\"置换\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":247},{\"name\":\"Polya原理\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":248},{\"name\":\"虚树\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":249},{\"name\":\"同余,中国剩余定理\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":250},{\"name\":\"莫比乌斯反演\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":251},{\"name\":\"组合数学\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":252},{\"name\":\"排列组合\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":253},{\"name\":\"前缀和\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":254},{\"name\":\"二项式定理\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":255},{\"name\":\"康托展开\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":256},{\"name\":\"袋与球问题\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":257},{\"name\":\"鸽笼\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":258},{\"name\":\"容斥\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":259},{\"name\":\"斐波那契,Fibonacci\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":260},{\"name\":\"卡特兰,Catalan\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":261},{\"name\":\"Stirling\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":262},{\"name\":\"A*算法\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":263},{\"name\":\"生成函数\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":264},{\"name\":\"线性规划\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":265},{\"name\":\"概率论,统计\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":266},{\"name\":\"简单概率\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":267},{\"name\":\"条件概率\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":268},{\"name\":\"Bayes\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":269},{\"name\":\"期望\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":270},{\"name\":\"线性代数\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":271},{\"name\":\"矩阵乘法\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":272},{\"name\":\"线性递推,递推式\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":273},{\"name\":\"高斯消元\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":274},{\"name\":\"异或方程组\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":275},{\"name\":\"逆元\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":276},{\"name\":\"线性基\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":277},{\"name\":\"微积分初步\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":278},{\"name\":\"极限\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":279},{\"name\":\"导数\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":280},{\"name\":\"积分\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":281},{\"name\":\"定积分\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":282},{\"name\":\"立体解析几何\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":283},{\"name\":\"级数\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":284},{\"name\":\"基本数组\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":285},{\"name\":\"向量\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":286},{\"name\":\"栈\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":287},{\"name\":\"队列\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":288},{\"name\":\"块状链表,块状数组,分块\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":289},{\"name\":\"st表,稀疏表\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":290},{\"name\":\"凸包\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":291},{\"name\":\"叉积\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":292},{\"name\":\"线段相交\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":293},{\"name\":\"点积\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":294},{\"name\":\"半平面相交,半平面交\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":295},{\"name\":\"最近点对\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":296},{\"name\":\"凸多边形的交\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":297},{\"name\":\"离散化扫描\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":298},{\"name\":\"旋转卡壳\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":299},{\"name\":\"字典树,Trie树\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":300},{\"name\":\"AC自动机\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":301},{\"name\":\"KMP\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":302},{\"name\":\"后缀数组,SA\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":303},{\"name\":\"后缀树\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":304},{\"name\":\"有限状态自动机\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":305},{\"name\":\"哈夫曼,Huffman\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":306},{\"name\":\"简单密码学\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":307},{\"name\":\"其它技巧\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":308},{\"name\":\"随机贪心,随机化\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":309},{\"name\":\"Nim游戏\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":310},{\"name\":\"博弈树\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":311},{\"name\":\"Shannon开关游戏\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":312},{\"name\":\"快速傅里叶变换,DFT,FFT\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":313},{\"name\":\"位运算,按位\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":314},{\"name\":\"骗分\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":315},{\"name\":\"整体二分\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":316},{\"name\":\"NP问题\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":317},{\"name\":\"构造\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":318},{\"name\":\"高性能\",\"type\":\"SpecialProblem\",\"color\":\"orange\",\"tagInt\":319},{\"name\":\"环套树\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":320},{\"name\":\"K-D Tree\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":321},{\"name\":\"Lucas\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":322},{\"name\":\"插头dp\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":323},{\"name\":\"快速数论变换NTT\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":324},{\"name\":\"回文自动机PAM\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":325},{\"name\":\"快速沃尔什变换FWT\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":326},{\"name\":\"快速沃尔什变换FWT\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":327},{\"name\":\"天津\",\"type\":\"Region\",\"color\":\"green\",\"tagInt\":328},{\"name\":\"Manacher算法\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":329},{\"name\":\"差分\",\"type\":\"Algorithm\",\"color\":\"red\",\"tagInt\":330},{\"name\":\"清华集训\",\"type\":\"Origin\",\"color\":\"blue\",\"tagInt\":331},{\"name\":\"网络流24题\",\"type\":\"Origin\",\"color\":\"blue\",\"tagInt\":332},{\"name\":\"COCI\",\"type\":\"Origin\",\"color\":\"blue\",\"tagInt\":333},{\"name\":\"BalticOI\",\"type\":\"Origin\",\"color\":\"blue\",\"tagInt\":334},{\"name\":\"ACM_ICPC\",\"type\":\"Origin\",\"color\":\"blue\",\"tagInt\":335},{\"name\":\"JOI\",\"type\":\"Origin\",\"color\":\"blue\",\"tagInt\":336}]\n";
        List<Tags> tags = JSONObject.parseArray(tagJson,Tags.class);
        for(Tags tag: tags){
            tagsRepository.save(tag);
        }
        logger.info("nodeHandler: 构建[标签]节点 完成");
        chain.process();
    }
}
